/* pages/exam/exam-record/exam-record.wxss */
.container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f4ff 100%);
  display: flex;
  flex-direction: column;
}

.action-section {
  padding: 15px 15px 20px;
  background: linear-gradient(135deg, #2c3e50, #4a6582);
  border-radius: 0 0 20px 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 10;
  width: 100%;

  .action-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    min-height: 200px; /* 设置最小高度，确保即使标题较短也有足够空间 */

    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      // background: linear-gradient(90deg, #3498db, #2c3e50);
    }

    .action-header {
      display: flex;
      align-items: center;
      margin-bottom: 25px; /* 增加底部边距 */

      .exam-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: linear-gradient(135deg, #3498db, #2c3e50);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 10px;
        box-shadow: 0 2px 6px rgba(52, 152, 219, 0.4);
        flex-shrink: 0; /* 防止图标被压缩 */
      }

      .action-title {
        flex: 1;
        min-height: 50px; /* 设置最小高度确保即使标题较短也有足够空间 */

        .title-main {
          display: block;
          font-size: 17px;
          font-weight: 700;
          color: #2c3e50;
          line-height: 1.4;
          word-break: break-word; /* 允许长标题换行 */
        }

        .title-sub {
          display: block;
          font-size: 13px;
          color: #409eff;
          font-weight: 500;
          margin-top: 6px; /* 增加顶部边距 */
          word-break: break-word; /* 允许长副标题换行 */
        }
      }
    }

    .stats-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 30px; /* 增加底部边距 */
      padding: 0 5px;

      .stat-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 13px;
        color: #606266;

        icon {
          margin-bottom: 6px; /* 增加图标底部边距 */
        }
      }
    }

    .action-buttons {
      display: flex;
      justify-content: space-between;
      gap: 15px; /* 增加按钮间距 */
      margin: 20px 0; /* 增加按钮区域的上下边距 */

      .action-btn {
        flex: 1;
        height: 50px; /* 增加按钮高度 */
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px; /* 增加字体大小 */
        font-weight: 500;
        color: #fff;
        border: none;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

        &:active {
          transform: translateY(2px);
          box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
        }

        &.exam-btn {
          background: linear-gradient(135deg, #3498db, #2980b9);
        }

        &.review-btn {
          background: linear-gradient(135deg, #1abc9c, #16a085);
        }
        
        &.full-width {
          flex: 100%;
        }
      }
    }
  }
}

.history-section {
  flex: 1;
  padding: 20px 15px 10px;
  background: #f5f7fa;
  border-radius: 20px 20px 0 0;
  margin-top: -15px;
  position: relative;
  z-index: 5;
  width: 100%;

  .section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    padding: 10px 0 0 10px;
    margin-bottom: 10px;
    position: relative;

    &::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0;
      width: 30px;
      height: 3px;
      // background: linear-gradient(90deg, #3498db, #2c3e50);
      border-radius: 1.5px;
    }
  }

  .history-item {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s ease;

    &:active {
      transform: translateY(-1px);
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    }

    .history-header {
      display: flex;
      align-items: center;
      margin-bottom: 12px;

      icon {
        margin-right: 5px;
      }

      .history-time {
        font-size: 14px;
        color: #606266;
        flex: 1;
      }

      .accuracy-label {
        font-size: 13px;
        font-weight: 600;
        color: #fff;
        padding: 3px 10px;
        border-radius: 20px;
        min-width: 50px;
        text-align: center;
      }

      /* 添加的CSS样式 */
      .continue-btn {
        background: linear-gradient(135deg, #3498db, #2980b9);
        color: #fff;
        border-radius: 20px;
        font-size: 12px;
        padding: 0 10px;
        height: 25px;
        line-height: 25px;
        margin: 0 0 0 7.5px;
        box-shadow: 0 1px 4px rgba(52, 152, 219, 0.3);
        border: none;
      }

      /* 添加的CSS样式 */
      .wrong-btn {
        background: linear-gradient(135deg, #c0392b, #e74c3c);
        color: #fff;
        border-radius: 20px;
        font-size: 12px;
        padding: 0 10px;
        height: 25px;
        line-height: 25px;
        margin: 0 0 0 7.5px;
        box-shadow: 0 1px 4px rgba(192, 57, 43, 0.3);
        border: none;
      }
    }

    .history-stats {
      display: flex;
      flex-direction: column;
      font-size: 14px;

      .stats-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
      }

      .stat-item {
        color: #909399;
      }

      .total-score {
        text-align: right;
        flex-shrink: 0;
      }

      .progress-container {
        width: 100%;
        display: flex;
        align-items: center;

        .progress-bar {
          flex: 1;
          height: 8px;
          background: #ebeef5;
          border-radius: 4px;
          position: relative;
          overflow: hidden;

          .progress {
            height: 100%;
            border-radius: 4px;
            position: absolute;
            left: 0;
            top: 0;
            transition: width 0.5s ease;
          }
        }
      }
    }
  }
}